import Request from "../Request"
import { trimRequestParams } from "../../utils"
// 示例使用
const apiPrefix = "https://api.example.com"
const request = new Request(apiPrefix)
//获取列表
export const getList = async (params) => await request.get<Array<{ id: number; name: string }>>("/user/page", trimRequestParams(params))

//提交数据
export const addUser = async (data) => await request.post<{ id: number; name: string }>("/user/addUser", trimRequestParams(data))
